local system = CEGUI.System:getSingleton()
local wmgr = CEGUI.WindowManager:getSingleton()
local cursor = CEGUI.MouseCursor:getSingleton()

wmgr:destroyAllWindows()
local root = wmgr:loadWindowLayout("titleScreen.layout")

system:setGUISheet(root)
cursor:hide()

dofile("gui/scripts/fileDialog.lua")

function checkFileSelected(e)
    if (selectedFilename ~= "") then
        local loadingScreen = LoadingState:new(Overseer:getSingleton(),selectedFilename)
        Overseer:getSingleton():changeState(loadingScreen)
    end
end